﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace ChuongtrinhTracnghiem.Model
{
    class Cauhoi
    {
        public Cauhoi()
        {
            Model.Ketnoi.Thuchienketnoi();
        }

        public void Them(string s)
        {
            Model.TruyvanSQL sql = new Model.TruyvanSQL();
            sql.SQL(s);
        }
        public void Sua(string s)
        {
            Model.TruyvanSQL sql = new Model.TruyvanSQL();
            sql.SQL(s);
        }
        public void Xoa(string s)
        {
            Model.TruyvanSQL sql = new Model.TruyvanSQL();
            sql.SQL(s);

        }

        public string Macauhoi(DataTable ds)
        {
            return (Convert.ToInt32(ds.Rows[ds.Rows.Count - 1]["CauhoiID"]) + 1).ToString();
        }
    }
}
